package com.wg.web_app.domin.response;

import java.util.List;

import com.wg.web_app.dao.table.TableUser;

public class User {
    public int id;
    public String userName;
    public String photoUrl;
    public List<PhoneNumber> numbers;
    public User() {
    	
    }
    public User(TableUser tu) {
    	this.id = tu.getId();
    	this.userName = tu.getUserName();
    }
	@Override
    public String toString() {
    	StringBuilder sb = new StringBuilder();
    	sb.append("{id:");
    	sb.append(id);
    	sb.append(",userName:");
    	sb.append(userName);
    	sb.append(",photoUrl:");
    	sb.append(photoUrl);
    	if(numbers != null){
        	sb.append(",numbers:");
        	sb.append("[");
        	for (int i = 0; i < numbers.size(); i++) {
    			sb.append(numbers.get(i));
    			if(i<numbers.size()-1)
    				sb.append(",");
    		}
        	sb.append("]");
    	}
    	sb.append("}");
    	return sb.toString();
    }
    
    public int getId() {
		return id;
	}
    public void setId(int id) {
		this.id = id;
	}
    public List<PhoneNumber> getNumbers() {
		return numbers;
	}
    public void setNumbers(List<PhoneNumber> numbers) {
		this.numbers = numbers;
	}
    public String getPhotoUrl() {
		return photoUrl;
	}
    public void setPhotoUrl(String photoUrl) {
		this.photoUrl = photoUrl;
	}
    public String getUserName() {
		return userName;
	}
    public void setUserName(String userName) {
		this.userName = userName;
	}	
}
